package com.lmu.travel.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lmu.travel.entity.Route;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author liuxuhuang
 * @className: RouteDao
 * @description: 线路dao层接口
 * @email liuxuhuang3970@qq.com
 * @date 2021/6/28 19:07
 * @version：1.0
 */
@Repository
@Mapper
public interface RouteDao extends BaseMapper<Route> {
    /**
     * 分页查询
     *
     * @param page
     * @return
     */
    IPage<Route> selectPage(Page<Route> page);

    /**
     * 更新路线访问人数
     *
     * @param rid
     */
    void updateRouteCount(String rid);

    /**
     * 按访问人数排列
     *
     * @return
     */
    List<Route> selectHot();
}
